{{ define "main" }}

<header>
    <div class="container">
        <h1>{{ .Title }}</h1>
        <p class="subtitle">{{ .Params.subtitle }}</p>
    </div>
</header>

{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}

<section>
    <div class="container">
        <section>
            {{ range $pages.GroupByDate "2006" }}
            <section>
                <h2>2020</h2>
                <div class="posts">
                    {{ range .Pages }}
                    <div class="post">
                        <a href="{{ .RelPermalink }}">
                            <div class="post-row">
                                <time>{{ .Date.Format "Jan 02" }}</time>
                                <h3>{{ .Title }}</h3>
                            </div>
                            <!--<div class="new-post">New!</div>-->
                        </a>
                    </div>
                    {{ end }}
                </div>
            </section>
            {{ end }}
        </section>
    </div>
</section>

{{ end }}
